import request from '@/request'
import {C2B} from '@/utils/wordtransfer.js'

// 查询默认系统列表
export const findSystemDefault = () => {
    return request.post("/system/defaultlist",{})
}

// 查询搜索并分页
export const findPages = (data) => {
    return request.post("/system/list",data)
}

// 保存和更新
export const saveUpdate = (data) => {
    return request.post("/system/saveupdate",data)    
}

// id查询明细
export const getById = (id) => {
    return request.post(`/system/get/${id}`,{})    
}

// id删除
export const delById = (id) => {
    return request.post(`/system/del/${id}`,{})
}

// 修改状态
export const updateStatus = (id,field,value) => {
    field = C2B(field)
    return request.post(`/system/status/${id}/${field}/${value}`,{})
}


// 修改默认
export const updateStatusDefault = (id) => {
    return request.post(`/system/statusdefault/${id}`,{})
}